<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>类型转换</title>
</head>
<body>
    <script>
        console.log(parseInt("10")); //10
        console.log(parseInt("10adbd")); //10
        console.log(parseInt("1dgd0")); //1
        console.log(parseInt("d10")); //NaN
        console.log(parseInt("10.59")); //10
        console.log(parseInt("10.59dag")); //10

        //parseFloat()
        //Number() 转数字
        // .toString 转字符串
        // String() 转字符串

        console.log(boolean(0));
        
    </script>
</body>
</html>